<template>
    <div style="padding-left: 10px;">
        <vxe-table
            border
            :data="lzList"
            class="transferRecords-table">
            <vxe-column field="fhjmc" title="环节名称" align="center"></vxe-column>
            <vxe-column field="fdbr" title="待办人" align="center"></vxe-column>
            <vxe-column field="fblr" title="办理人" align="center"></vxe-column>
            <vxe-column field="ffssj" title="发送时间" align="center"></vxe-column>
            <vxe-column field="fblsj" title="办理时间" align="center"></vxe-column>
            <vxe-column field="blzt" title="办理状态" align="center"></vxe-column>
            <vxe-column field="fbllx" title="办理类型" align="center"></vxe-column>
            <vxe-column field="fblyj" title="办理意见" align="center"></vxe-column>
        </vxe-table>
    </div>
</template>
<script>
import { axios } from '@/utils/request'
import { getMoreUserSignLinkList } from './service/index'
export default {
    props: {
        config:{
            type:Object,
            default:()=>{
                return {}
            },
            required:false,
        },
    },
    data() {
        return {
            lzList: [],
            lzColumns: [
                {
                    title: '环节名称',
                    dataIndex: 'fhjmc',
                    key: 'fhjmc',
                    fixed: 'left',
                    width: 150,
                },{
                    title: '待办人',
                    dataIndex: 'fdbr',
                    key: 'fdbr',
                    width: 150,
                    align: 'center'
                },{
                    title: '办理人',
                    dataIndex: 'fblr',
                    key: 'fblr',
                    width: 100,
                },{
                    title: '发送时间',
                    dataIndex: 'ffssj',
                    key: 'ffssj',
                    width: 170,
                },{
                    title: '办理时间',
                    dataIndex: 'fblsj',
                    key: 'fblsj',
                    width: 170,
                },{
                    title: '办理状态',
                    dataIndex: 'blzt',
                    key: 'blzt',
                    width: 100,
                },{
                    title: '办理类型',
                    dataIndex: 'fbllx',
                    key: 'fbllx',
                    width: 300,
                },{
                    title: '办理意见',
                    dataIndex: 'fblyj',
                    key: 'fblyj',
                    fixed: 'right',
                    align: 'center'
                },
            ],
            qmImgList: [],
            displayList: [],
        }
    },
    mounted(){
        this.getData()
    },
    methods: {
        customRow() {
            return {
                style: {
                    'font-size' : '16px',
                    'text-align' : 'center'
                },
            }
        },
        getData(){
            // //console.log('没触发？？？')
            axios({
                url: this.config.api,
                method:'get' ,
                params: {
                    ...this.config.paramet,
                },
                url_1:this.config.urlType?'':'outside',
                url_2:this.config.urlType?'outside':''
            }).then((res) => {
                this.lzList = []
                let arr1 = res.result.records

                arr1.forEach(async item => {
                    // //console.log('item---',item)
                    item = {
                        ...item,
                        id: item.oaid,
                    }
                    this.lzList.push(item)
                    this.displayList.push(item)
                    // if(item.fdbrid){
                    //     let resa = await getMoreUserSignLinkList({ids:item.fdbrid})
                    //     //console.log('???',resa,resa.result)
                    //     if(resa.success && resa.result.length){
                    //         if(resa.result[0].signLink == ''){
                    //             //console.log('没有获得图片 signLink == 0')
                    //             this.qmImgList.push({
                    //                 hjmc: item.fhjmc,
                    //                 url: null
                    //             })
                    //         } else {
                    //             this.qmImgList.push({
                    //                 hjmc: item.fhjmc,
                    //                 url: resa.result[0].signLink+'&aa='+Date.now()
                    //             })
                    //             //console.log('获得的签名图片列表',this.qmImgList)
                    //         }
                    //     } else {
                    //         //console.log('没有获得图片')
                    //     }
                    // } else {}
                })
                //console.log('签名图片列表--总',this.qmImgList)
                // this.$emit('getCirculationQmImg',this.qmImgList,this.displayList)
            })
        },
    },
}
</script>
<style lang="less">
.transferRecords-table {
    .vxe-header--row {
        background: rgb(222, 229, 237) !important;
        th {
            font-size: 18px;
            font-weight: 600 !important;
        }
    }
    th{
        text-align: center;
        font-size: 18px;
        padding: 3px 5px;
        font-family: 'SimSun', serif;
    }
    td{
        text-align: center;
        padding: 3px 5px;
        height: 40px;
        font-size: 18px;
        font-family: 'SimSun', serif;
    }
    tr:nth-child(even) {
        background: rgb(240, 240, 241) !important;
    }
}
</style>
